package org.cainiao.basic.reactive.threading_cheduler;

import reactor.core.publisher.Mono;

public class ThreadingTest {

    public static void main(String[] args) throws InterruptedException {
        final Mono<String> mono = Mono.just("hello ");
        Thread t = new Thread(() -> mono
            .map(msg -> msg + "thread ")
            .subscribe(v -> System.out.println(v + Thread.currentThread().getName()))
        );
        t.start();
        t.join();
    }

}
